<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<tpl> $NCharset </tpl>" />
<link href="<tpl> $template_dir </tpl>/member/css/layout.css" rel="stylesheet" type="text/css" />
<tpl> include file ='../head.config.html' </tpl>
</head>
<body><tpl>include file ='../header.html'</tpl>
<div id="container761">
  <div class="own_member_main">
 <tpl>include file ='own_menu.html'</tpl>
  <div class="member_right">
<div class="new_main_left">
		<div class="new_main_left1">
	<h1 class="new_text"><tpl> $langShopPayDetailManage </tpl></h1>
 <i></i>
	</div>
	<b></b>
	</div><div id="own_main_rightop"><tpl> $langShopPayDetailManageRemark </tpl></div>
	<div id="own_main_rightop_line" style="margin-top:-3px;">
	  <b class="b4"></b>
	  <b class="b3"></b>
	  <b class="b2"></b>
	  <b class="b1"></b>
	  </div>
	  <form action="own_shop_pay.php?action=pay_save" method="post" name="form_pay" id="form_pay">
      <table border="1" cellpadding="0" cellspacing="0" bordercolor="#DEEBEF" style="overflow:visible; margin-top:10px" class="table_style2">
		<tr class="tr_dotted">
          <td height="30" colspan="8" align="left" style="padding-right:5px">
		  	<tpl> $langShopPayState </tpl>：<br />
			
			<tpl> if $member_array.shop_availability_time neq '' </tpl>
				<tpl> $langShopPayModeShopUseTimeTo </tpl>：<em><tpl> $member_array.shop_availability_time </tpl></em>
				<tpl> if $use_day_num neq '' </tpl>
					(<tpl> $langShopPayShopUseRemark </tpl><em><tpl> $use_day_num </tpl></em><tpl> $langDay </tpl>)	
				<tpl> else </tpl>
					<font color="#FF0000">(<tpl> $langShopPayShopClosed </tpl>)</font>
				<tpl> /if </tpl>
				<br />
			<tpl> /if </tpl>
				<tpl> $langShopPayModeProductNumber </tpl>：<em><tpl> $member_array.product_number|default:'0' </tpl></em>
				(<tpl> $langShopPayUsed </tpl><em><tpl> $product_count|default:'0' </tpl></em><tpl> $langShopPayModeProductNumberUnit </tpl>)
		  </td>
        </tr>
		<tr class="tr_dotted">
          <td height="30" colspan="8" align="left" style="padding-right:5px"><tpl> $langShopPayDetailType </tpl>：
		  	<select name="pay_mode_id" id="pay_mode_id" onchange="change_mode(this.value);">
				<tpl> section name=loop loop=$mode_array </tpl>
				<option value="<tpl> $mode_array[loop].mode_id </tpl>"><tpl> $mode_array[loop].mode_name </tpl></option>
				<tpl> /section </tpl>
			</select>
		  </td>
        </tr>
		<tr class="tr_dotted">
          <td height="30" colspan="8" align="left" style="padding-right:5px" >
			<tpl> section name=loop loop=$mode_array </tpl>
			<span id="span_mode_content_<tpl> $mode_array[loop].mode_id </tpl>" style="display:none">
				<tpl> $langShopPayDetailModeMoney </tpl>：<tpl> $mode_array[loop].mode_money </tpl>
				<tpl> $langShopPayDetailModeName </tpl>：
				<tpl> $langShopPayModeShopUseTime </tpl><tpl> $langShopPayAdd </tpl><tpl> $mode_array[loop].mode_shop_show_time </tpl><tpl> $langShopPayModeShopUseTimeUnit </tpl>
				<tpl> $langShopPayModeProductNumber </tpl><tpl> $langShopPayAdd </tpl><tpl> $mode_array[loop].mode_product_number </tpl><tpl> $langShopPayModeProductNumberUnit </tpl>
			</span>
			<tpl> /section </tpl>
		  </td>
        </tr>
	 	<tr class="tr_dotted">
          <td height="25" align="left" valign="middle" bgcolor="#F5F9FA" ><input type="radio" id="pay_type_online" name="pay_type" checked="checked" value="online" onclick="$('#tr_online').css('display','');$('#tr_offline').css('display','none');" /><tpl> $langShopPayDetailPayOnline </tpl></td>
        </tr>
		<tr class="tr_dotted" id="tr_online"><!-- 线上 -->
          <td height="25" align="left" valign="middle" bgcolor="#FCFEFE">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  	<input type="radio" name="online_type" value="alipay" checked="checked" /><tpl> $langShopPayDetailPayAlipay </tpl>
			<input type="radio" name="online_type" value="tenpay" /><tpl> $langShopPayDetailPayTenpay </tpl>
		  </td>
        </tr>
		<tr class="tr_dotted">
          <td height="25" align="left" valign="middle" bgcolor="#F5F9FA" ><input type="radio" id="pay_type_offline" name="pay_type" value="offline" onclick="$('#tr_online').css('display','none');$('#tr_offline').css('display','');" /><tpl> $langShopPayDetailPayOffline </tpl></td>
        </tr>
		<tr class="tr_dotted" id="tr_offline" style="display:none"><!-- 线下 -->
          <td height="25" valign="middle">
		  	<table width="100%" bgcolor="#FCFEFE" class="table_style_nopadding">
				<tr class="tr_dotted">
					<td height="30" align="center" valign="middle"><tpl> $langShopPayDetailSel </tpl></td>
					<td height="30" valign="middle"><tpl> $langShopPayDetailOfflinePayName </tpl></td>
					<td height="30" valign="middle"><tpl> $langShopPayDetailOfflinePayAccount </tpl></td>
					<td height="30" valign="middle"><tpl> $langShopPayDetailOfflinePayConsignee </tpl></td>
				</tr>
				<tpl> section name=loop loop=$offline_pay </tpl>
					<tr class="tr_dotted">
						<td height="30" align="center" valign="middle">
							<input type="radio" name="offline_pay_id" <tpl> if $smarty.section.loop.rownum eq '1' </tpl>checked="checked"<tpl> /if </tpl> value="<tpl> $offline_pay[loop].pay_id </tpl>" />
						</td>
						<td height="30" valign="middle">
							<tpl> if $offline_pay[loop].pay_ico neq '' </tpl>
							<img src="<tpl> $offline_pay[loop].pay_ico </tpl>" width="60px;" height="40px;" />&nbsp;&nbsp;
							<tpl> /if </tpl>
							<tpl> $offline_pay[loop].pay_name </tpl>
						</td>
						<td height="30" valign="middle">
							<tpl> $offline_pay[loop].pay_account </tpl>
						</td>
						<td height="30" valign="middle">
							<tpl> $offline_pay[loop].pay_consignee </tpl>
						</td>
					</tr>
				<tpl> /section </tpl>
					<tr class="tr_dotted">
						<td height="30" align="center" valign="middle"><tpl> $langShopPayDetailOfflineSenderNumber </tpl>：</td>
						<td height="30" align="left" valign="middle" colspan="2">
						<input type="text" name="sender_number" id="sender_number" class="new_input" style="width:200px;" />
						<label style="display:none" for="sender_number" class="wrong" metaDone="true" generated="true"></label>
						</td>
					</tr>
			</table>
		  </td>
        </tr>
		<tr class="tr_dotted">
          <td height="30" align="center" valign="middle">
		  	<input type="submit" value="<tpl> $langShopPayDetailPay </tpl>" class="new_anniu"/></td>
        </tr>
      </table>
	  </form>
		 <div style="clear:both"></div>
  </div>
   <div style="clear:both"></div>
  </div> <tpl> include file ='../../../html/footer.html' </tpl>
  </div>
</body>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
	//对添加表单做的验证定义
	$('#form_pay').validate({
		errorClass: "wrong",
		rules: {
			sender_number:{required:function(){
					if($('#pay_type_offline').attr('checked') == true){
						return true;
					}else{
						return false;
					}
				}
			}
		},
		messages: {
			sender_number:{required:"<tpl> $errShopPayDetailSenderNumberIsEmpty </tpl>"}
		}
	});
	//显示当前的缴费条目的内容
	$('#span_mode_content_'+$('#pay_mode_id').val()).css('display','');
});

//显示指定缴费条目的内容，隐藏其他内容
function change_mode(mode_id){
	//隐藏全部
	$('span').each(function(){
		if(this.id.indexOf('span_mode_content_') != -1){
			$('#'+this.id).css('display','none');
		}
	});
	//显示指定ID
	$('#span_mode_content_'+mode_id).css('display','');
}
</script>
</html>